﻿Imports DTO
Imports System.Data.OleDb

Public Class NhanVienDAO
    Public Shared Function KiemTraNhanVien(ByVal user As NhanVienDTO) As Boolean
        Dim sql As String = "select * from NHANVIEN where TenNhanVien='" & user.TenNhanVien & "' and MatKhauNhanVien='" & user.MatKhau & "' and PhanQuyen='" & user.PhanQuyen & "'"
        Dim dt As DataTable = DatabassProvider.ExcuQuery(sql)
        If dt.Rows.Count <> 0 Then
            Return True
        Else
            Return False
        End If

    End Function

    Public Shared Function LayDanhSachNhanVien() As DataTable
        Dim sql As String = "select * from NHANVIEN"
        Return DatabassProvider.ExcuQuery(sql)
    End Function
End Class
